/**
 * 这里存放全局通用的工具类 使用 wx.$xxx 的方式调用
 */

import dayjs from "./dayjs/index"
import http from "./http/index"
import storage from "./storage/index"
import * as modal from "./modal/index"

/** 将工具类写到wx的对象上 */
export const wxTools = function(){
  wx.$http = http
  wx.$storage = storage
  wx.$dayjs = dayjs as any
  wx.$alert = modal.alert
  wx.$confirm = modal.confirm
  wx.$toast = modal.toast
  wx.$loading = modal.loading
  wx.$hideLoading = modal.hideLoading
}
